Skip to content
This repository has been archived by the owner on Jan 15, 2020. It is now read-only.

Login with current user in GraphiQL #35

Closed
wants to merge 6 commits into from

Conversation

nicolaslopezj
Copy link
Contributor

@nicolaslopezj nicolaslopezj commented Sep 10, 2016

Provides the Meteor authorization header automatically.

This works with apollographql/apollo-server#133

This fixes #29

@nicolaslopezj
Copy link
Contributor Author

@lorensr now that apollographql/apollo-server#133 is merged, we can merge this code

@@ -28,7 +30,9 @@ const defaultOptions = {

export const createApolloServer = (givenOptions, givenConfig) => {

let graphiqlOptions = Object.assign({}, defaultConfig.graphiqlOptions, givenConfig.graphiqlOptions);
let config = Object.assign({}, defaultConfig, givenConfig);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this line should take care of all attributes, including graphiqlOptions?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we do it that way any graphiqlOptions that we pass will override the whole defaultConfig.graphiqlOptions object. That's because Object.assign is not deep.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah, thanks

lorensr added a commit that referenced this pull request Sep 13, 2016
@lorensr
Copy link
Contributor

lorensr commented Sep 13, 2016

Let me know when your addition is published in a new version of apollo-server on npm that we can update to, thanks

@helfer
Copy link

helfer commented Sep 13, 2016

@lorensr I think we'll publish 0.3 in a few days. it will include this change and a few others.

@rdickert
Copy link

Awesome @nicolaslopezj! 🎉

@rdickert
Copy link

rdickert commented Oct 4, 2016

@lorensr I think this is ready to go?

@lorensr
Copy link
Contributor

lorensr commented Oct 5, 2016

Working!

image

@lorensr
Copy link
Contributor

lorensr commented Oct 5, 2016

@lorensr lorensr closed this Oct 5, 2016
@rdickert
Copy link

rdickert commented Oct 5, 2016

confirmed working for me too 👍

@nicolaslopezj nicolaslopezj deleted the auto-auth branch October 13, 2016 00:56
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Provide a way for GraphiQL user to be logged in
4 participants